package com.yaj.service;

import com.yaj.pojo.LeaveRequest;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yaj.vo.LeaveRequestVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaojiu
 * @since 2024-08-19
 */
public interface ILeaveRequestService extends IService<LeaveRequest> {

    /**
     * 获取离职申请表单
     * @return
     */
    List<LeaveRequestVo> getLeaveRequests();

    /**
     * 审批请假
     * @param approverId
     * @param id
     */
    void approveLeave(Long approverId, Long id);

    /**
     * 拒绝请假
     * @param approverId
     * @param id
     */
    void rejectLeave(Long approverId, Long id);

    /**
     * 获取请假记录
     * @param id
     * @return
     */
    List<LeaveRequestVo> getLeaveRecords(Long id);
}
